home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1994 / MacHack 1994.toast / MacHack™ 1987-1994 / MacHack™ '90 / MacHack'90 Proceedings / John Norstad / Reusable Code / Source / scn.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-06-10  |  1.6 KB  |  44 lines  |  [TEXT/MPS ]

  1. /*______________________________________________________________________
  2.  
  3.     snc.h - Volume Scanning Module Interface.
  4.     
  5.     Copyright © 1988, 1989, 1990 Northwestern University.  Permission is 
  6.     granted to use this code in your own projects, provided you give credit 
  7.     to both John Norstad and Northwestern University in your about box or 
  8.     document.
  9. _____________________________________________________________________*/
  10.  
  11. #ifndef __scn__
  12. #define __scn__
  13.  
  14.  
  15. /* The following structure is used to maintain a list of folder names.  
  16.     
  17.     When the caller-supplied doFile routine is called, it is passed a
  18.     handle to the head of the list.  The list contains all the 
  19.     folder names in the current path, in reverse order (lowest-level 
  20.     folder name to highest-level folder name).  The list is maintained as 
  21.     a push-down stack:  When a new folder is encountered it is added to the 
  22.     head of the list, and it is removed when the scan of that folder is 
  23.     complete. */
  24.  
  25. typedef struct scn_FListEl {
  26.     struct scn_FListEl    **next;            /* handle to next folder name */
  27.     Str255                    name;                /* folder name */
  28.     char                        accessRights;    /* access rights - see IM V-391 */
  29. } scn_FListEl, *scn_FListElPtr, **scn_FListElHandle;
  30.  
  31. typedef Boolean (*scn_DoFilePtr)(CInfoPBRec *pBlock,
  32.     scn_FListElHandle folderList, long RefCon, Boolean mfs);
  33.  
  34. typedef Boolean (*scn_CheckCancelPtr)(void);
  35.  
  36. extern Boolean scn_Vol (short volRefNum, long dirID, 
  37.     Str255 fName, short fVRefNum, scn_DoFilePtr doFile, 
  38.     long refCon, scn_CheckCancelPtr checkCancel, 
  39.     Rect *fldNameRect, Rect *fleNameRect, Rect *thrmRect, 
  40.     short nameFont, short nameSize);
  41. extern void scn_Update (Rect *thrmRect);
  42.  
  43.  
  44. #endif